<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="contact.domain.DAOContact"%>
<%@page import="contact.domain.DAOEnterprise"%>
<%@page import="contact.domain.Contact"%>
<%@page import="contact.domain.Enterprise"%>
<%@page import="contact.domain.PhoneNumber"%>
<%@page import="java.util.Iterator"%>
<%@page import="contact.domain.DAOContactGroup"%>
<%@page import="contact.domain.ContactGroup"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" media="screen" href="style.css">
<% 
DAOContactGroup daoGroup = new DAOContactGroup();
Long id = new Long (request.getParameter("idGroup"));
System.out.println(id);
ContactGroup group = daoGroup.read(id);
%>
<title><%=group.getGroupName() %></title>
</head>
<body>
<jsp:include page="menu.html" />
<div id="content">
<form id="showgroup">
	<h1><%=group.getGroupName() %></h1>
	<p>
		<%
			for (Contact contact : group.getContacts()){
				%>
				<a class="contact" href="showcontact.jsp?id=<%=contact.getId()%>"><%=contact.getFirstName()+" "+contact.getLastName() %></a><br>
				<%
			}
		%>
	</p>
</form>
</div>
</body>
</html>